#define _CRT_SECURE_NO_WARNINGS 1
#include<iostream>
#include<vector>
#include<stack>
using namespace std;
  struct TreeNode {
      int val;
      TreeNode *left;
      TreeNode *right;
      TreeNode() : val(0), left(nullptr), right(nullptr) {}
      TreeNode(int x) : val(x), left(nullptr), right(nullptr) {}
      TreeNode(int x, TreeNode *left, TreeNode *right) : val(x), left(left), right(right) {}
  };
 
class Solution {
public:
    vector<int> inorderTraversal(TreeNode* root) {
        vector<int> as;
        stack<TreeNode*> aq;
        TreeNode* cur = root;
        while (cur || !aq.empty())
        {
            while (cur)
            {
                aq.push(cur);
                cur = cur->left;
            }
            TreeNode* qw = aq.top();
            aq.pop();
            as.push_back(qw->val);
            cur = qw->right;
        }
        return as;
    }
};
int main()
{


	return 0;
}